package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"time"
)

func requestAccessToken()  {
	res, err := http.Get("http://php.yckz003.top/internal/get_accesstoken?get_type=1")
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, err := ioutil.ReadAll(res.Body)
	fmt.Println(string(body))
	time.AfterFunc(120*time.Minute, requestAccessToken)
}


func main() {
	go requestAccessToken()
	select {}
}
